with Generic_Pile ;use Generic_Pile;
with Ada.Containers.Vectors;use Ada.Containers.Vectors;

package body Generic_Pile is

   procedure Empiler(P : in out Pile; V : T)is
   begin
      P := P & V ;
   end Empiler;


   procedure Depiler(P : in out Pile; V : out T) is
   begin
      V:= Last_Element(P);
      Delete_Last(P);
   end Depiler;


   procedure Regarder(P : in out Pile; V : out T) is
   begin
      if not Est_Vide(P) then
         V:= Last_Element(P);
      end if;
   end Regarder;

   function Est_Vide(P : Pile) return Boolean is
   begin
      return Is_Empty(P);
   end Est_Vide;
end Generic_Pile;
